package com.cloudpark.service;

import java.util.List;
import java.util.Map;

import com.cloudpark.common.util.Pagination;
import com.cloudpark.model.entity.AdminUser;
import com.cloudpark.model.entity.User;
import com.cloudpark.model.entity.AdminUserRole;

public interface UserService {

    User findUserById(long id);

    AdminUser findByAccount(String account);

    List<AdminUserRole> findRolesByUserId(Long userId);

	User findUserByOpenId(String openId);

	void saveUser(User user);

	Pagination queryUserList(Map<String, String> params, int start, int length,
			Long estateId);

	Pagination queryRoleList(Map<String, String> params, int start, int length,
			Long estateId);

	Pagination queryAdminUserList(Map<String, String> params, int start,
			int length, Long estateId);

	List<AdminUser> findByAccountWithEstateId(String account, Long estateId);

	void saveOrUpdateAdminUser(String adminUserId, String name,
			String account, String roleId, Long estateId);

	String queryRoleOptions(Long estateId);

	void saveAdminUser(AdminUser adminUser);

}
